<template>
	<view class="prize-wrap">
		<view class="list">
			<view v-for="(item,index) in prizeList"
				:key="index"
				class="item">
				<view class="prize-name">
					抽中{{item.prizeName}}
				</view>
				<view class="album-name">{{item.albumName || '积分'}}</view>
				<view class="time">
					{{$timeFormat(item.time,"yyyy-mm-dd hh:MM:ss")}}
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				prizeList: []
			}
		},
		onLoad() {
			this.getInfo()
		},
		methods: {
			async getInfo() {
				let res = await this.$http.get("/getPrizeRecord")
				if (res.data.code == 0) {
					this.prizeList = res.data.data
				}
			}
		}
	}
</script>
<style lang="scss"
	scoped>
	.prize-wrap {
		width: 100%;
		min-height: 100vh;
		background: #f6f6f6;

		.list {
			padding: 30rpx 30rpx 0;

			.item {
				margin-bottom: 30rpx;
				background: #fff;
				padding: 30rpx;
				border-radius: 10rpx;
				.album-name{
					font-size: 26rpx;
					color: #8a8a8a;
					margin-top: 10rpx;
				}
				.time{
					margin-top: 16rpx;
					color: #8a8a8a;
				}
			}
		}
	}
</style>